{template 'common/header'}
<div class="main">
	<ul class="nav nav-tabs">
		<li{if $_GPC['do'] == 'manage' || $_GPC['do'] == '' } class="active"{/if}><a href="{php echo $this->createWebUrl('manage');}">管理中心</a></li>
		<li{if $_GPC['do'] == 'record' } class="active"{/if}><a href="{php echo $this->createWebUrl('record',array('rid'=>$rid))}">宝藏统计</a></li>
	</ul>
	
	
	<div class="panel-heading">	
		<form action="{php echo $this->createWebUrl('record',array('rid'=>$rid))}" method="post" class="form-horizontal table-search" role="form">
      <input type="text" class="form-control " name="nick" value="" placeholder="微信昵称">
      <input type="hidden" name="rid" value="{$rid}">
                <span class="input-group-btn">
                    <button class="btn  btn-primary" type="submit"> 搜索</button>
                 </span>
     </form>
	</div>
	<div class="panel panel-default">
		<div class="panel-body table-responsive">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>
					<th style="width:60px;">昵称</th>
					<th style="width:50px;" align="center">头像</th>
					<th style="width:50px;" align="center">宝藏累计</th>
				  <th style="width:50px;" align="center">成功次数</th>
					<th style="width:70px;" align="center">参与时间</th>
					
					<th style="width:50px;" align="center">姓名</th>
					<th style="width:60px;" align="center">手机号</th>
					<th style="width:80px;" align="center">备注</th>
					
					<th style="width:100px;" align="center">操作</th>
				</tr>
			</thead>
			<tbody>
			
				{loop $userlist $row}
				<tr>
					<td>{$row['nick']}</td>
					<td><img alt="" src="{$row['headimg']}" width='auto' style="max-width:50px; max-height:50px;" height='auto'></td>
					<td>{$row['dtuser_points_counts']}</td>
					<td>{$row['count_points']}</td>
					<td>{php echo date("Y/m/d h:i",$row['pointstime'])}</td>
				
					<td>{$row['name']}</td>
					<td>{$row['phone']}</td>
					<td>{$row['addr']}</td>
					
					<td>
						<a class="btn btn-default" data-toggle="tooltip" data-placement="top" href="{php echo $this->createWebUrl('editrecord',array('id'=>$row['id'],'rid'=>$row['rid']));}" title="编辑"><i class="fa fa-edit"></i></a>
						<a class="btn btn-default" data-toggle="tooltip" data-placement="top" href="#" onclick="drop_confirm('您确定要删除吗?', '{php echo $this->createWebUrl('deleterecord',array('id'=>$row['id'],'rid'=>$row['rid'],'openid'=>$row['openid']))}');" title="删除"><i class="fa fa-times"></i></a>
					</td>
				</tr>
				{/loop}
			</tbody>
		</table>
	</div>
	</div>
	{$pager}
</div>
<script>
function drop_confirm(msg, url){
    if(confirm(msg)){
        window.location = url;
    }
}

function deleteallrecord(){
	var url="{php echo $this->createWebUrl('deleteallrecord',array('rid'=>$rid))}";
	if(confirm("确认清空所有记录吗？")){
		window.location = url;
	}
}

</script>
{template 'common/footer'}